<!--
 * @Descripttion: 
 * @Author: 人生只如初见
 * @Date: 2021-09-23 16:43:52
 * @LastEditors: 人生只如初见
 * @LastEditTime: 2021-09-26 18:38:37
-->
<template>
  <div id="app">
    <div class="relation-panel">1</div>
    <div class="editor">
      <div class="toolbar">
        <div class="toolbar-container" ref="toolbarContainer"></div>
      </div>
      <div class="canvas" ref="canvas"></div>
    </div>
    <div class="attribute-panel" >
      <div class="attributeContainer" ref="attributeContainer"></div>
    </div>
  </div>
</template>

<script>
import Editor from "./core/editor";
export default {
  name: "App",
  data() {
    return {
      editor: null,
    };
  },
  components: {},
  mounted() {
    this.editor = new Editor({
      canvasElement: this.$refs.canvas,
      toolbarElement:this.$refs.toolbarContainer,
      attributePanel:this.$refs.attributeContainer,
    });
  },
};
</script>

<style lang="less">
#app {
  height: 100%;
  width: 100%;
  display: flex;
  .relation-panel {
    width: 160px;
    height: 100%;
  }
  .attribute-panel {
    width: 160px;
    height: 100%;
  }
  .editor {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    .toolbar {
      height: 50px;
      width: 100%;
    }
    .canvas {
      width: 100%;
      flex: 1;
    }
  }
}
</style>
